<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
<head>
<title>openldap.git - openldap</title>
<meta name='generator' content='cgit v0.9.2'/>
<meta name='robots' content='index, nofollow'/>
<link rel='stylesheet' type='text/css' href='/cgit-data/cgit.css'/>
<link rel='alternate' title='Atom feed' href='http://pkgs.fedoraproject.org/cgit/openldap.git/atom/openldap-userconfig-setgid.patch?h=master' type='application/atom+xml'/>
</head>
<body>
<div id='cgit'><table id='header'>
<tr>
<td class='logo' rowspan='2'><a href='/cgit/'><img src='/cgit-data/cgit.png' alt='cgit logo'/></a></td>
<td class='main'><a href='/cgit/'>index</a> : <a title='openldap.git' href='/cgit/openldap.git/'>openldap.git</a></td><td class='form'><form method='get' action=''>
<select name='h' onchange='this.form.submit();'>
<option value='FC-4-split'>FC-4-split</option>
<option value='f10'>f10</option>
<option value='f11'>f11</option>
<option value='f12'>f12</option>
<option value='f13'>f13</option>
<option value='f14'>f14</option>
<option value='f15'>f15</option>
<option value='f16'>f16</option>
<option value='f17'>f17</option>
<option value='f18'>f18</option>
<option value='f19'>f19</option>
<option value='f20'>f20</option>
<option value='f7'>f7</option>
<option value='f8'>f8</option>
<option value='f9'>f9</option>
<option value='master' selected='selected'>master</option>
<option value='private-moznss-f17'>private-moznss-f17</option>
</select> <input type='submit' name='' value='switch'/></form></td></tr>
<tr><td class='sub'>openldap</td><td class='sub right'>Jesse Keating</td></tr></table>
<table class='tabs'><tr><td>
<a href='/cgit/openldap.git/'>summary</a><a href='/cgit/openldap.git/refs/'>refs</a><a href='/cgit/openldap.git/log/openldap-userconfig-setgid.patch'>log</a><a class='active' href='/cgit/openldap.git/tree/openldap-userconfig-setgid.patch'>tree</a><a href='/cgit/openldap.git/commit/openldap-userconfig-setgid.patch'>commit</a><a href='/cgit/openldap.git/diff/openldap-userconfig-setgid.patch'>diff</a><a href='/cgit/openldap.git/stats/openldap-userconfig-setgid.patch'>stats</a></td><td class='form'><form class='right' method='get' action='/cgit/openldap.git/log/openldap-userconfig-setgid.patch'>
<select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='text' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit/openldap.git/tree/'>root</a>/<a href='/cgit/openldap.git/tree/openldap-userconfig-setgid.patch'>openldap-userconfig-setgid.patch</a></div><div class='content'>blob: 70f0d28ecab7c4152aa414adde93e462179ba0f8 (<a href='/cgit/openldap.git/plain/openldap-userconfig-setgid.patch'>plain</a>)
<table summary='blob content' class='blob'>
<tr><td class='linenumbers'><pre><a class='no' id='n1' name='n1' href='#n1'>1</a>
<a class='no' id='n2' name='n2' href='#n2'>2</a>
<a class='no' id='n3' name='n3' href='#n3'>3</a>
<a class='no' id='n4' name='n4' href='#n4'>4</a>
<a class='no' id='n5' name='n5' href='#n5'>5</a>
<a class='no' id='n6' name='n6' href='#n6'>6</a>
<a class='no' id='n7' name='n7' href='#n7'>7</a>
<a class='no' id='n8' name='n8' href='#n8'>8</a>
<a class='no' id='n9' name='n9' href='#n9'>9</a>
<a class='no' id='n10' name='n10' href='#n10'>10</a>
<a class='no' id='n11' name='n11' href='#n11'>11</a>
<a class='no' id='n12' name='n12' href='#n12'>12</a>
<a class='no' id='n13' name='n13' href='#n13'>13</a>
<a class='no' id='n14' name='n14' href='#n14'>14</a>
<a class='no' id='n15' name='n15' href='#n15'>15</a>
<a class='no' id='n16' name='n16' href='#n16'>16</a>
<a class='no' id='n17' name='n17' href='#n17'>17</a>
<a class='no' id='n18' name='n18' href='#n18'>18</a>
</pre></td>
<td class='lines'><pre><code>Normally, skips reading of user configuration file when running with different effective UID.
This patch adds the same behavior for GID.

Author: Nalin Dahyabhai &lt;nalin@redhat.com&gt;

diff --git a/libraries/libldap/init.c b/libraries/libldap/init.c
index e6b17b4..fbf4829 100644
--- a/libraries/libldap/init.c
+++ b/libraries/libldap/init.c
@@ -678,7 +678,7 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl )
 	openldap_ldap_init_w_sysconf(LDAP_CONF_FILE);
 
 #ifdef HAVE_GETEUID
-	if ( geteuid() != getuid() )
+	if ( geteuid() != getuid() || getegid() != getgid() )
 		return;
 #endif
 
</code></pre></td></tr></table>
</div> <!-- class=content -->
<div class='footer'>generated  by cgit v0.9.2 at 2014-01-09 14:22:50 (GMT)</div>
</div> <!-- id=cgit -->
</body>
</html>
